<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .father {
            position: relative;
            width: 500px;
            height: 500px;
            border: 1px solid black;
            margin: 100px auto;
        }
        .son {
            position: absolute;
            width: 200px;
            height: 100px;
            top: 250px;
            left: 250px;
            background-color: pink;
            transition: all 1s;
        }
        .father:hover .son {
            transform: translate(-50%, -50%);
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>
</body>
</html>